/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
    color: #333;
    transition: all 0.3s;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    transition: all 0.3s;
    min-height: 100vh;
    position: relative;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    background-color: #1a252f;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: #34495e;
}

.menu-item.active {
    background-color: rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
}

.menu-item i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-item span {
    font-size: 0.95rem;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    transition: all 0.3s;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    display: none;
    padding: 5px;
}

.toggle-sidebar:hover {
    color: #3498db;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.card h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.4rem;
}

.card p {
    line-height: 1.6;
    color: #555;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.action-btn {
    padding: 6px 12px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.edit-btn {
    background-color: #ffc107;
    color: #212529;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.add-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    margin-bottom: 15px;
    display: inline-block;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-actions {
    margin-top: 20px;
}

.submit-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        height: 100vh;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .main-content.shifted {
        transform: translateX(250px);
    }

    .toggle-sidebar {
        display: block;
    }
}

/* 简单的图标替代方案 */
.icon-dashboard:before {
    content: "📊";
}

.icon-products:before {
    content: "🧱";
}

.icon-categories:before {
    content: "📦";
}

.icon-suppliers:before {
    content: "🏭";
}

.icon-settings:before {
    content: "⚙️";
}